﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace CNKI.TPI.Web.Search.Model
{
    [DataContract]
    public class LoginUserInfo
    {
        public enum MessageFlage
        {
            /// <summary>
            /// 操作成功
            /// </summary>
            Success = 1,
            /// <summary>
            /// IP地址不在范围内
            /// </summary>
            IpError = 0,
            /// <summary>
            /// 用户已经停用
            /// </summary>
            StopError = 2,
            /// <summary>
            /// 密码错误
            /// </summary>
            PasswordError=3,
            /// <summary>
            /// 过期
            /// </summary>
            Expire = 4
        };
        public LoginUserInfo()
        {
            DBInfo = new List<UserDBInfo>();
            status = MessageFlage.Success;
        }
        [DataMember]
        public string UserID { set; get; }
        [DataMember]
        public string UserCode { set; get; }
        [DataMember]
        public string UserName { set; get; }
        [DataMember]
        public string password { set; get; }
        [DataMember]
        public IList<SYS_CMS_GROUP> Role { set; get; }
        [DataMember]
        public IList<UserDBInfo> DBInfo { set; get; }
        [DataMember]
        public IList<string> Security { set; get; }
        public MessageFlage status;
        /// <summary>
        /// 登录方式，0：本地登录，1：单点登录
        /// </summary>
        public int LoginType { set; get; }
    }
}
